package com.common.jiji.methods;

import com.common.jiji.JJDriverService;
import com.common.jiji.entity.BaseJJBean;
import com.common.jiji.entity.JJuserInfoBean;
import com.common.jiji.entity.LoginBean;
import com.common.jiji.parms.LoginParms;
import com.common.retrofit.base.BaseMethods;

import rx.Observable;
import rx.Subscriber;

public class GetJJUserInfoMethods extends BaseMethods {

    private static GetJJUserInfoMethods m_ins = null;

    public static GetJJUserInfoMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetJJUserInfoMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetJJUserInfoMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "driver/";
    }

    private JJDriverService initService() {
        return getRetrofit().create(JJDriverService.class);
    }


    public void     getDriverInfo(Subscriber<JJuserInfoBean> subscriber
    ) {

        Observable observable = initService().getDriverInfo();
        toOtherSubscribe(observable, subscriber);
    }
}
